// 假期规则数据类型
export interface VacationRule {
  shift_id: any
  type: string
  default_class_id: any
  user_id: any
  address: any
  id?: number
  leaveName: string
  leaveCode: string
  leaveViewUnit: 'day' | 'halfDay' | 'hour'
  bizType: 'general_leave' | 'lieu_leave'
  naturalDayLeave: '0' | '1'
  hoursInPerDay: number
}

// 通用响应格式
export interface CommonResponse {
  code: string
  msg: string
  result: boolean
}

// 列表响应格式
export interface ListResponse {
  info_list: VacationRule[]
}

// 假期余额相关类型
export interface VacationQuota {
  id: number
  leaveName: string
  leave_code: string
  leaveViewUnit: 'day' | 'hour' | 'halfDay'
  quota_num: number
}

export interface EmployeeVacation {
  userid: number
  username: string
  holidaylist: VacationQuota[]
}

// 员工假期余额展示类型
export interface EmployeeBalance {
  username: string
  department: string
  joinDate: string
  firstWorkDate: string
  isResigned: boolean
  adjustLeave: string | number
  annualLeave: string | number
  sickLeave: string | number
  maternityLeave: string | number
  marriageLeave: string | number
  regularLeave: string | number
}

export interface VacationBalanceResponse {
  msg: string
  code: string
  data: EmployeeVacation[]
}

// 更新余额请求参数
export interface UpdateBalanceParams {
  userid: number
  leave_code: string
  quota_num: number
}

// 更新余额响应
export interface UpdateBalanceResponse {
  msg: string
  code: string
} 